<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Aestate: aestate.work.repository.Repository Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aestate
   &#160;<span id="projectnumber">1.0.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceaestate.html">aestate</a></li><li class="navelem"><a class="el" href="namespaceaestate_1_1work.html">work</a></li><li class="navelem"><a class="el" href="namespaceaestate_1_1work_1_1repository.html">repository</a></li><li class="navelem"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html">Repository</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classaestate_1_1work_1_1repository_1_1_repository-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">aestate.work.repository.Repository Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for aestate.work.repository.Repository:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository__inherit__graph.png" border="0" usemap="#aestate_8work_8repository_8_repository_inherit__map" alt="Inheritance graph"/></div>
<map name="aestate_8work_8repository_8_repository_inherit__map" id="aestate_8work_8repository_8_repository_inherit__map">
<area shape="rect" title=" " alt="" coords="20,5,199,361"/>
<area shape="rect" href="classaestate_1_1work_1_1_manage_1_1_pojo.html" title=" " alt="" coords="12,409,207,765"/>
<area shape="rect" href="classaestate_1_1work_1_1_manage_1_1model.html" title=" " alt="" coords="5,813,213,891"/>
</map>
</div>
<div class="dynheader">
Collaboration diagram for aestate.work.repository.Repository:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository__coll__graph.png" border="0" usemap="#aestate_8work_8repository_8_repository_coll__map" alt="Collaboration graph"/></div>
<map name="aestate_8work_8repository_8_repository_coll__map" id="aestate_8work_8repository_8_repository_coll__map">
<area shape="rect" title=" " alt="" coords="5,5,184,361"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad66c073ae1c84d39f2868e43c43bc189"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#ad66c073ae1c84d39f2868e43c43bc189">__init__</a> (self, config_obj=None, instance=None, log_conf=None, close_log=False, serializer=<a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a>, **kwargs)</td></tr>
<tr class="separator:ad66c073ae1c84d39f2868e43c43bc189"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23a9cc8dca79ab503ab2537c8d29e975"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a23a9cc8dca79ab503ab2537c8d29e975">conversion</a> (self)</td></tr>
<tr class="separator:a23a9cc8dca79ab503ab2537c8d29e975"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a3ea0e3484460a8dc08a43f54e9a809"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a9a3ea0e3484460a8dc08a43f54e9a809">first</a> (self)</td></tr>
<tr class="separator:a9a3ea0e3484460a8dc08a43f54e9a809"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b0fadba8d270423923ecedb012565c9"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a7b0fadba8d270423923ecedb012565c9">last</a> (self)</td></tr>
<tr class="separator:a7b0fadba8d270423923ecedb012565c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3424c501b017a48c7ccfc1f31d8dee1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a3424c501b017a48c7ccfc1f31d8dee1d">find_all</a> (self, **kwargs)</td></tr>
<tr class="separator:a3424c501b017a48c7ccfc1f31d8dee1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c81f4cc1f19e32a669a66adb72cc388"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a8c81f4cc1f19e32a669a66adb72cc388">find_field</a> (self, *args, **kwargs)</td></tr>
<tr class="separator:a8c81f4cc1f19e32a669a66adb72cc388"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9de20f0ad54da7c1b6ab8bc7e3f28ec2"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a9de20f0ad54da7c1b6ab8bc7e3f28ec2">find_one</a> (self, sql, **kwargs)</td></tr>
<tr class="separator:a9de20f0ad54da7c1b6ab8bc7e3f28ec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4957e544a6e7b5fce766d015395823c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#ac4957e544a6e7b5fce766d015395823c">find_many</a> (self, sql, **kwargs)</td></tr>
<tr class="separator:ac4957e544a6e7b5fce766d015395823c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0087bc5f425b10dddd4f8a27f98bd6dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a0087bc5f425b10dddd4f8a27f98bd6dc">find_sql</a> (self, sql, **kwargs)</td></tr>
<tr class="separator:a0087bc5f425b10dddd4f8a27f98bd6dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6451c2ce3e3119f33943bd802aa738a4"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a6451c2ce3e3119f33943bd802aa738a4">update</a> (self, key=None)</td></tr>
<tr class="separator:a6451c2ce3e3119f33943bd802aa738a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc24119ecb4a0a7eebb54faf1dc81632"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#acc24119ecb4a0a7eebb54faf1dc81632">remove</a> (self, key=None)</td></tr>
<tr class="separator:acc24119ecb4a0a7eebb54faf1dc81632"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e48e6c99c9c38c5280bf4d7e6a949ed"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a5e48e6c99c9c38c5280bf4d7e6a949ed">save</a> (self, *args, **kwargs)</td></tr>
<tr class="separator:a5e48e6c99c9c38c5280bf4d7e6a949ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedb01a6a9d72679a9560b7ca97e93a67"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#aedb01a6a9d72679a9560b7ca97e93a67">create</a> (self, pojo, **kwargs)</td></tr>
<tr class="separator:aedb01a6a9d72679a9560b7ca97e93a67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fb8096830e2df1bed24cd94f5f4919b"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a6fb8096830e2df1bed24cd94f5f4919b">copy</a> (self, **kwargs)</td></tr>
<tr class="separator:a6fb8096830e2df1bed24cd94f5f4919b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4502a56b17fa50cecefeec9b5c69afab"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a4502a56b17fa50cecefeec9b5c69afab">execute_sql</a> (self, sql, params=None, mode=<a class="el" href="classaestate_1_1work_1_1_modes_1_1_e_x___m_o_d_e_l.html#a2ae38bbd2e12179f466df27ecb10974f">EX_MODEL.SELECT</a>, **kwargs)</td></tr>
<tr class="separator:a4502a56b17fa50cecefeec9b5c69afab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a547fcd05dbc50a7544d307e6b407e596"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a547fcd05dbc50a7544d307e6b407e596">foreign_key</a> (self, cls, key_name, field_name=None, data=None, operation=None)</td></tr>
<tr class="separator:a547fcd05dbc50a7544d307e6b407e596"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ad6ade0a364a6d26b9217c64afe2cf135"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#ad6ade0a364a6d26b9217c64afe2cf135">ParseUtil</a></td></tr>
<tr class="separator:ad6ade0a364a6d26b9217c64afe2cf135"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fe8925d2fe118234b92067560e96a2c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#a4fe8925d2fe118234b92067560e96a2c">db_util</a></td></tr>
<tr class="separator:a4fe8925d2fe118234b92067560e96a2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab269e249ed16a1b870cfab7825a94727"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#ab269e249ed16a1b870cfab7825a94727">result</a></td></tr>
<tr class="separator:ab269e249ed16a1b870cfab7825a94727"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7eae41f8776e1aff71d662b66cc57da"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaestate_1_1work_1_1repository_1_1_repository.html#ad7eae41f8776e1aff71d662b66cc57da">datas</a></td></tr>
<tr class="separator:ad7eae41f8776e1aff71d662b66cc57da"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><pre class="fragment">- POJO类
    - 继承该类表名此类为数据库的pojo类
    - 需要配合:@Table(name, msg, **kwargs)使用
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00016">16</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ad66c073ae1c84d39f2868e43c43bc189"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad66c073ae1c84d39f2868e43c43bc189">&#9670;&nbsp;</a></span>__init__()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>config_obj</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>instance</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>log_conf</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>close_log</em> = <code>False</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>serializer</em> = <code><a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">通过继承此类将数据表实体化

    实体化之后你可以使用像类似find_one()等操做

    可以调用conversion()方法将其转化为ORM框架常用的样式

    无需担心类型问题，无需担心datetime无法转换
使用方法:
    #加入Table注解，并标注表名与描述，因考虑使用者后期优化问题，请务必填写MSG参数

    @Table(name="demo_table", msg="demo message")

    #继承Repository并得到相对应的半自动ORM操做
    class TestClass(Repository):
# 初始化并super配置
def __init__(self,**kwargs):
    super(DemoTable, self).__init__(config_obj=ConF(), log_conf={
        'path': "/log/",
        'save_flag': True
    }, **kwargs)

初始化配置:

    aestate.util.Config.config的配置类,详见:aestate.work.Config.MysqlConfig

Attributes:
    以下的字段均可覆盖重写

    config_obj:数据源配置类

    log_conf:日志配置工具

    log_obj:日志对象

    close_log:是否关闭日志

    serializer:序列化使用的类,默认使用aestate.work.Serialize.QuerySet

    instance:实例

    __table_name__:表名称

    operation:操作类的实现

    fields:操作的字段

    sqlFields:sql方言

:param config_obj:配置类
:param log_conf:日志配置类
:param close_log:是否关闭日志显示功能
:param serializer:自定义序列化器,默认使用aestate.work.Serialize.QuerySet
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00023">23</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a23a9cc8dca79ab503ab2537c8d29e975"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23a9cc8dca79ab503ab2537c8d29e975">&#9670;&nbsp;</a></span>conversion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.conversion </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">将此Repository转换为ORM实体

Return:
    ORM转换之后的实体对象
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00133">133</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_a23a9cc8dca79ab503ab2537c8d29e975_icgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_a23a9cc8dca79ab503ab2537c8d29e975_icgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_a23a9cc8dca79ab503ab2537c8d29e975_icgraph" id="classaestate_1_1work_1_1repository_1_1_repository_a23a9cc8dca79ab503ab2537c8d29e975_icgraph">
<area shape="rect" title=" " alt="" coords="459,39,637,80"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a9a3ea0e3484460a8dc08a43f54e9a809" title=" " alt="" coords="232,5,411,47"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a7b0fadba8d270423923ecedb012565c9" title=" " alt="" coords="232,71,411,112"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a9de20f0ad54da7c1b6ab8bc7e3f28ec2" title=" " alt="" coords="5,5,184,47"/>
</map>
</div>

</div>
</div>
<a id="a6fb8096830e2df1bed24cd94f5f4919b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fb8096830e2df1bed24cd94f5f4919b">&#9670;&nbsp;</a></span>copy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.copy </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">复制对象进行操做

不建议多次创建对象，建议使用 pojo.copy()来生成对象
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00366">366</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>

</div>
</div>
<a id="aedb01a6a9d72679a9560b7ca97e93a67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aedb01a6a9d72679a9560b7ca97e93a67">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.create </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>pojo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">插入属性:
    返回受影响行数
:param kwargs:包含所有参数:
    pojo:参照对象
    last_id:是否需要返回最后一行数据,默认False
:return:rowcount,last_id if last_id=True
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00347">347</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_aedb01a6a9d72679a9560b7ca97e93a67_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_aedb01a6a9d72679a9560b7ca97e93a67_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_aedb01a6a9d72679a9560b7ca97e93a67_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_aedb01a6a9d72679a9560b7ca97e93a67_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,184,47"/>
<area shape="rect" href="namespaceaestate.html#a134bbbf29caacb0c7c996840cf7a0730" title=" " alt="" coords="232,13,337,39"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_aedb01a6a9d72679a9560b7ca97e93a67_icgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_aedb01a6a9d72679a9560b7ca97e93a67_icgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_aedb01a6a9d72679a9560b7ca97e93a67_icgraph" id="classaestate_1_1work_1_1repository_1_1_repository_aedb01a6a9d72679a9560b7ca97e93a67_icgraph">
<area shape="rect" title=" " alt="" coords="232,5,411,47"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a5e48e6c99c9c38c5280bf4d7e6a949ed" title=" " alt="" coords="5,5,184,47"/>
</map>
</div>

</div>
</div>
<a id="a4502a56b17fa50cecefeec9b5c69afab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4502a56b17fa50cecefeec9b5c69afab">&#9670;&nbsp;</a></span>execute_sql()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.execute_sql </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>params</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>mode</em> = <code><a class="el" href="classaestate_1_1work_1_1_modes_1_1_e_x___m_o_d_e_l.html#a2ae38bbd2e12179f466df27ecb10974f">EX_MODEL.SELECT</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">:param sql:执行的sql
:param params:防止sql注入的参数
:param mode:查询模式,默认使用SELECT,使用aestate.work.Modes.EX_MODEL枚举修改执行的sql类型
:param kwargs:其他需要的参数
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00376">376</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>

</div>
</div>
<a id="a3424c501b017a48c7ccfc1f31d8dee1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3424c501b017a48c7ccfc1f31d8dee1d">&#9670;&nbsp;</a></span>find_all()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"> <a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a> aestate.work.repository.Repository.find_all </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">从当前数据表格中查找所有数据

Returns:
    将所有结果封装成POJO对象集合并返回数据
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00154">154</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>

</div>
</div>
<a id="a8c81f4cc1f19e32a669a66adb72cc388"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c81f4cc1f19e32a669a66adb72cc388">&#9670;&nbsp;</a></span>find_field()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"> <a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a> aestate.work.repository.Repository.find_field </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">*&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">只查询指定名称的字段,如:

    SELECT user_name FROM `user`

    即可参与仅解析user_name为主的POJO对象

:param args:需要参与解析的字段名

:return:
    将所有结果封装成POJO对象集合并返回数据</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00165">165</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_a8c81f4cc1f19e32a669a66adb72cc388_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_a8c81f4cc1f19e32a669a66adb72cc388_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_a8c81f4cc1f19e32a669a66adb72cc388_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_a8c81f4cc1f19e32a669a66adb72cc388_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,184,47"/>
<area shape="rect" href="namespaceaestate.html#a134bbbf29caacb0c7c996840cf7a0730" title=" " alt="" coords="232,13,337,39"/>
</map>
</div>

</div>
</div>
<a id="ac4957e544a6e7b5fce766d015395823c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4957e544a6e7b5fce766d015395823c">&#9670;&nbsp;</a></span>find_many()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"> <a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a> aestate.work.repository.Repository.find_many </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">查询出多行数据

    第一个必须放置sql语句

:param kwargs:包含所有参数:

    pojo:参照对象

    sql:处理过并加上%s的sql语句

    params:需要填充的字段

    print_sql:是否打印sql语句

:return 将所有数据封装成POJO对象并返回</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00232">232</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_ac4957e544a6e7b5fce766d015395823c_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_ac4957e544a6e7b5fce766d015395823c_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_ac4957e544a6e7b5fce766d015395823c_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_ac4957e544a6e7b5fce766d015395823c_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,184,47"/>
<area shape="rect" href="namespaceaestate.html#a134bbbf29caacb0c7c996840cf7a0730" title=" " alt="" coords="232,13,337,39"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_ac4957e544a6e7b5fce766d015395823c_icgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_ac4957e544a6e7b5fce766d015395823c_icgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_ac4957e544a6e7b5fce766d015395823c_icgraph" id="classaestate_1_1work_1_1repository_1_1_repository_ac4957e544a6e7b5fce766d015395823c_icgraph">
<area shape="rect" title=" " alt="" coords="232,5,411,47"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a9de20f0ad54da7c1b6ab8bc7e3f28ec2" title=" " alt="" coords="5,5,184,47"/>
</map>
</div>

</div>
</div>
<a id="a9de20f0ad54da7c1b6ab8bc7e3f28ec2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9de20f0ad54da7c1b6ab8bc7e3f28ec2">&#9670;&nbsp;</a></span>find_one()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.find_one </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">查找第一条数据

    可以是一条

    也可以是很多条中的第一条

code:

    result = self.find_many(**kwargs)
    if len(result) == 0:
return None
    else:
return result[0]

:param kwargs:包含所有参数:

    pojo:参照对象

    sql:处理过并加上%s的sql语句

    params:需要填充的字段

    print_sql:是否打印sql语句

:return 返回使用find_many()的结果种第一条
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00195">195</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_a9de20f0ad54da7c1b6ab8bc7e3f28ec2_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_a9de20f0ad54da7c1b6ab8bc7e3f28ec2_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_a9de20f0ad54da7c1b6ab8bc7e3f28ec2_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_a9de20f0ad54da7c1b6ab8bc7e3f28ec2_cgraph">
<area shape="rect" title=" " alt="" coords="5,39,184,80"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#ac4957e544a6e7b5fce766d015395823c" title=" " alt="" coords="232,5,411,47"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a9a3ea0e3484460a8dc08a43f54e9a809" title=" " alt="" coords="232,71,411,112"/>
<area shape="rect" href="namespaceaestate.html#a134bbbf29caacb0c7c996840cf7a0730" title=" " alt="" coords="505,13,611,39"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a23a9cc8dca79ab503ab2537c8d29e975" title=" " alt="" coords="469,67,647,108"/>
<area shape="rect" href="classaestate_1_1work_1_1_modes_1_1_dict_to_object.html#aaf9884c9453262b17c2dd23a51abff92" title=" " alt="" coords="459,132,657,173"/>
</map>
</div>

</div>
</div>
<a id="a0087bc5f425b10dddd4f8a27f98bd6dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0087bc5f425b10dddd4f8a27f98bd6dc">&#9670;&nbsp;</a></span>find_sql()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"> <a class="el" href="classaestate_1_1work_1_1_serialize_1_1_query_set.html">QuerySet</a> aestate.work.repository.Repository.find_sql </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">返回多个数据并用list包装:

    - 可自动化操作

    - 请尽量使用find_many(sql)操作

:param kwargs:包含所有参数:
    sql:处理过并加上%s的sql语句
    params:需要填充的字段
    print_sql:是否打印sql语句
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00263">263</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_a0087bc5f425b10dddd4f8a27f98bd6dc_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_a0087bc5f425b10dddd4f8a27f98bd6dc_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_a0087bc5f425b10dddd4f8a27f98bd6dc_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_a0087bc5f425b10dddd4f8a27f98bd6dc_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,184,47"/>
<area shape="rect" href="namespaceaestate.html#a134bbbf29caacb0c7c996840cf7a0730" title=" " alt="" coords="232,13,337,39"/>
</map>
</div>

</div>
</div>
<a id="a9a3ea0e3484460a8dc08a43f54e9a809"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a3ea0e3484460a8dc08a43f54e9a809">&#9670;&nbsp;</a></span>first()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.first </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">获取数据库中的第一个
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00142">142</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_a9a3ea0e3484460a8dc08a43f54e9a809_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_a9a3ea0e3484460a8dc08a43f54e9a809_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_a9a3ea0e3484460a8dc08a43f54e9a809_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_a9a3ea0e3484460a8dc08a43f54e9a809_cgraph">
<area shape="rect" title=" " alt="" coords="5,39,184,80"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a23a9cc8dca79ab503ab2537c8d29e975" title=" " alt="" coords="242,5,421,47"/>
<area shape="rect" href="classaestate_1_1work_1_1_modes_1_1_dict_to_object.html#aaf9884c9453262b17c2dd23a51abff92" title=" " alt="" coords="232,71,431,112"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_a9a3ea0e3484460a8dc08a43f54e9a809_icgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_a9a3ea0e3484460a8dc08a43f54e9a809_icgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_a9a3ea0e3484460a8dc08a43f54e9a809_icgraph" id="classaestate_1_1work_1_1repository_1_1_repository_a9a3ea0e3484460a8dc08a43f54e9a809_icgraph">
<area shape="rect" title=" " alt="" coords="232,5,411,47"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a9de20f0ad54da7c1b6ab8bc7e3f28ec2" title=" " alt="" coords="5,5,184,47"/>
</map>
</div>

</div>
</div>
<a id="a547fcd05dbc50a7544d307e6b407e596"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a547fcd05dbc50a7544d307e6b407e596">&#9670;&nbsp;</a></span>foreign_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.foreign_key </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>cls</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>key_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>field_name</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>data</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>operation</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">根据外键来查

Examples:
    第一种：

    &gt;&gt;&gt; from apps.fontend.models import  Label, SmLabel
    &gt;&gt;&gt; smlabel = SmLabel()
    &gt;&gt;&gt; label = Label()
    &gt;&gt;&gt; label.find_all()
    &gt;&gt;&gt; label.foreign_key(smlabel.copy, 'label_id')
    &gt;&gt;&gt; datas = label.datas

    第二种：

    &gt;&gt;&gt; page = int(requests.GET['page']) \
    ...         if 'page' in requests.GET.keys() \
    ...         else 1
    ...
    &gt;&gt;&gt; sm_label_list = sm_label.orm.filter(id=pk)
    &gt;&gt;&gt; sm_label.foreign_key(
    ...    cls=need.copy,
    ...    key_name='label_id',
    ...    field_name="need_list",
    ...    datas=sm_label_list,
    ...    operation=lambda dt, i: need.orm
    ...        .find()
    ...        .where(label_id=dt[i].id)
    ...        .limit((page - 1) * PAGE_SIZE, PAGE_SIZE)
    ...        .end()
    ...)
    &gt;&gt;&gt; need_list = sm_label.datas
    &gt;&gt;&gt; return Result.success(data=need_list.to_dict())


:param cls:目标外键的类，注意不是对象，是类
:param key_name:外键的id
:param field_name:保存进去的字段名字，默认以表名命名
:param data:使用已有的数据作为外键
:param operation:自定义操作
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00390">390</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>

</div>
</div>
<a id="a7b0fadba8d270423923ecedb012565c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b0fadba8d270423923ecedb012565c9">&#9670;&nbsp;</a></span>last()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.last </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">获取最后一个参数
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00148">148</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_a7b0fadba8d270423923ecedb012565c9_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_a7b0fadba8d270423923ecedb012565c9_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_a7b0fadba8d270423923ecedb012565c9_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_a7b0fadba8d270423923ecedb012565c9_cgraph">
<area shape="rect" title=" " alt="" coords="5,39,184,80"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#a23a9cc8dca79ab503ab2537c8d29e975" title=" " alt="" coords="242,5,421,47"/>
<area shape="rect" href="classaestate_1_1work_1_1_modes_1_1_dict_to_object.html#aaf9884c9453262b17c2dd23a51abff92" title=" " alt="" coords="232,71,431,112"/>
</map>
</div>

</div>
</div>
<a id="acc24119ecb4a0a7eebb54faf1dc81632"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc24119ecb4a0a7eebb54faf1dc81632">&#9670;&nbsp;</a></span>remove()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.remove </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>key</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">执行更新操作:
    返回受影响行数

:param key:主键，where的参考数据
:return:
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00315">315</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_acc24119ecb4a0a7eebb54faf1dc81632_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_acc24119ecb4a0a7eebb54faf1dc81632_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_acc24119ecb4a0a7eebb54faf1dc81632_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_acc24119ecb4a0a7eebb54faf1dc81632_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,184,47"/>
<area shape="rect" href="namespaceaestate.html#a134bbbf29caacb0c7c996840cf7a0730" title=" " alt="" coords="232,13,337,39"/>
</map>
</div>

</div>
</div>
<a id="a5e48e6c99c9c38c5280bf4d7e6a949ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e48e6c99c9c38c5280bf4d7e6a949ed">&#9670;&nbsp;</a></span>save()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.save </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">*&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">**&#160;</td>
          <td class="paramname"><em>kwargs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">将当前储存的值存入数据库
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00340">340</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_a5e48e6c99c9c38c5280bf4d7e6a949ed_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_a5e48e6c99c9c38c5280bf4d7e6a949ed_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_a5e48e6c99c9c38c5280bf4d7e6a949ed_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_a5e48e6c99c9c38c5280bf4d7e6a949ed_cgraph">
<area shape="rect" title=" " alt="" coords="5,107,184,149"/>
<area shape="rect" href="classaestate_1_1dbs_1_1base_1_1_opera_base.html#aea39292057e411a3e061dd2f2e0d4f4f" title=" " alt="" coords="251,5,504,32"/>
<area shape="rect" href="classaestate_1_1work_1_1commad_1_1_commands.html#acd7d01b00bd04f10e98fb9913cedc51c" title=" " alt="" coords="232,56,523,83"/>
<area shape="rect" href="classaestate_1_1work_1_1repository_1_1_repository.html#aedb01a6a9d72679a9560b7ca97e93a67" title=" " alt="" coords="288,107,467,149"/>
<area shape="rect" href="classaestate_1_1work_1_1orm_1_1_a_orm.html#a1f5c7190aee672a77dae6c11b262a1e6" title=" " alt="" coords="266,173,489,200"/>
<area shape="rect" href="classaestate_1_1dbs_1_1__mysql_1_1_opera_base.html#adb5f67794e28563d5f8e9373ec90d147" title=" " alt="" coords="281,225,473,266"/>
<area shape="rect" href="namespaceaestate.html#a134bbbf29caacb0c7c996840cf7a0730" title=" " alt="" coords="571,115,676,141"/>
</map>
</div>

</div>
</div>
<a id="a6451c2ce3e3119f33943bd802aa738a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6451c2ce3e3119f33943bd802aa738a4">&#9670;&nbsp;</a></span>update()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def aestate.work.repository.Repository.update </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>key</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">执行更新操作:
    返回受影响行数

:param key:主键，where的参考数据
:return:
</pre> 
<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00290">290</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classaestate_1_1work_1_1repository_1_1_repository_a6451c2ce3e3119f33943bd802aa738a4_cgraph.png" border="0" usemap="#classaestate_1_1work_1_1repository_1_1_repository_a6451c2ce3e3119f33943bd802aa738a4_cgraph" alt=""/></div>
<map name="classaestate_1_1work_1_1repository_1_1_repository_a6451c2ce3e3119f33943bd802aa738a4_cgraph" id="classaestate_1_1work_1_1repository_1_1_repository_a6451c2ce3e3119f33943bd802aa738a4_cgraph">
<area shape="rect" title=" " alt="" coords="5,5,184,47"/>
<area shape="rect" href="namespaceaestate.html#a134bbbf29caacb0c7c996840cf7a0730" title=" " alt="" coords="232,13,337,39"/>
</map>
</div>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ad7eae41f8776e1aff71d662b66cc57da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7eae41f8776e1aff71d662b66cc57da">&#9670;&nbsp;</a></span>datas</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aestate.work.repository.Repository.datas</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00437">437</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>

</div>
</div>
<a id="a4fe8925d2fe118234b92067560e96a2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4fe8925d2fe118234b92067560e96a2c">&#9670;&nbsp;</a></span>db_util</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aestate.work.repository.Repository.db_util</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00123">123</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>

</div>
</div>
<a id="ad6ade0a364a6d26b9217c64afe2cf135"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6ade0a364a6d26b9217c64afe2cf135">&#9670;&nbsp;</a></span>ParseUtil</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aestate.work.repository.Repository.ParseUtil</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00083">83</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>

</div>
</div>
<a id="ab269e249ed16a1b870cfab7825a94727"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab269e249ed16a1b870cfab7825a94727">&#9670;&nbsp;</a></span>result</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aestate.work.repository.Repository.result</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="repository_8py_source.html#l00162">162</a> of file <a class="el" href="repository_8py_source.html">repository.py</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>aestate/work/<a class="el" href="repository_8py_source.html">repository.py</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
